package jvm.FourCharacteristic;

import java.lang.ref.WeakReference;
import java.sql.SQLOutput;

/**
 * 弱引用
 */
public class weakReference {
    public static void main(String[] args) {
        WeakReference<publicData> w = new WeakReference<>(new publicData());

        System.out.println(w.get());
        System.gc();;
        System.out.println(w.get());
    }
}
